﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace zichan.Entity
{
    /// <summary>
    /// 类型字段
    /// </summary>
    public class AsseteField
    {
        [Key]
        public int Id { get; set; }
        [Required(ErrorMessage ="字段名不为空")]
        public string Name { get; set; }
        [Required(ErrorMessage ="序号不为空")]
        [RegularExpression(@"^\+?[1-9]\d*$", ErrorMessage ="只能输入正整数")]
        public int Sort { get; set; }
        public int AsseteClassId { get; set; }
        [NotMapped]
        public int UseCount { get; set; }
        [NotMapped]
        public string AssetClassName { get; set; }
    }
}
